1. Field of the Invention
The present invention relates to a method for extracting raw data from an image resulting from a camera shot.
More specifically but not exclusively, it relates to a method for presenting data extracted from an image along a desired view angle, from a digital image taken by a photographic or cinematographic camera whether integrated or not into a communication device under any incidence.
It is notably applied to transmission and storage of text data and digitized graphics viewed beforehand by a camera under any incidence and then processed by correcting the projective deformation and/or optionally by enhancing the resolution in order to obtain a corrected image having higher legibility, viewed along an angle of incidence different from that of the camera shot, for example under normal incidence or any predetermined incidence. Of course, with the invention useful information may be extracted before or after correction. Such a process is most particularly suitable for transmitting text and/or graphic information taken by a camera fitted onto a portable communications terminal, such as for example, a cellular radio transmitter/receiver.
2. Description of the Prior Art
Of course, in order to extract raw data relating to printed or handwritten information in an image and to infer from them, zones to be corrected, the applicant has already proposed a solution consisting of extracting the information by calculating, as extracted raw data, a difference image D(C, L) (in fact, the contrast between the background's light level and the light level of the data to be extracted). A threshold value is used for selecting the values to be extracted from this difference image. This threshold value VS may thereby be selected as a threshold value of the gradient for removing the grid of lines (square pattern). However, this method has the following drawbacks:
If no grid of lines is present in the original image, value VS corresponds to the threshold for removing noise. It is found that this threshold is difficult to obtain by using a conventional histogram technique which does not provide satisfactory results.
If grid lines are present, the correct threshold for finding a pattern may be determined, but this threshold value cannot always be used as a threshold for extracting a piece of information. Indeed, this threshold value always does not remove either grid lines or noise completely because the non-predictive image contrast varies like a diffuse saturation and like fogged image surfaces due to random illumination conditions.
In the case of color images, three channels (red, green and blue) need to be considered and it is not clearly apparent whether one should have one threshold per channel or one threshold for all the channels.
Moreover, it is known that reading and/or interpretation by a person of a text or graphic reproduced from information delivered by a camera which views an original document, assumes that shooting is performed under or close to normal incidence in order to allow recognition of letters composing the text and interpretation of the graphic (which most often requires observance of the shapes and proportions).
Indeed, when the document is viewed by a camera under any incidence, the produced image has a projective deformation: accordingly, starting from a certain distance from the camera, disappearance of details which are required for character recognition and for consequently understanding the document, is reported.
In order to eliminate these drawbacks, the applicant has already proposed a solution consisting of extracting identifiable contextual data present in the image taken by the camera and correcting the raw or extracted data delivered by the camera by means of these contextual data, the corrected data being then stored in memory and/or transmitted to an addressee so as to be displayed for reading purposes.
The contextual data used for performing the correction of raw data may affect a pattern (a physical, plotted or printed contour) initially existing in the document or reported beforehand, certain parameters of which are known beforehand. The correction process may then comprise the following steps:                searching for this pattern in the raw image taken by the camera,        calculating projective deformations exhibited by the raw image, from deformations of the pattern which it contains and which arise through changes in the aforementioned parameters,        determining the corrections to be made to the raw data or to the extracted data depending on the projective deformations,        generating an image containing the corrected data, while taking into account the corrections determined beforehand.        
The pattern searching step is then obtained by a first searching sequence including:                detecting boundaries present in the image,        extracting boundaries, the length of which exceeds a predetermined value, and        detecting zones delimited by the boundaries found, with a sufficient surface area (larger than a predetermined value) and not touching the edge of the image.        
For each area found, this process comprises a calculation step for determining the main axis of the zone, for finding a point external to the zone on said main axis, the construction of an external cone issued from the external point, the extraction of the points from the boundary, the external normal of which is opposed to the vector which joins it and starts from the external point, the calculation of the line borne by the main axis of the extracted points, when the four lines are found, the calculation of four apices of the quadrilateral derived from the four lines and then, when the surface area of the quadrilateral is close to the surface area of the zone, the calculation of the homography deforming the quadrilateral into a rectangle having pre-established proportions.
It is found that one of the drawbacks of this method precisely consists in that it involves proportions set beforehand. Of course, if these proportions set beforehand are not the initial ones, the homographic transformation performed on the image leads to changes in the proportions of the objects contained in the corrected image.
Moreover, it is found that the homographic calculations used hitherto, are particularly complicated. Indeed, for each pixel of the final image, a zone of the initial image needs to be determined, the luminance and chrominance values of which are read in order to subsequently assign them in the final image to the location which this pixel should have according to a homographic relationship.
Now, it is seen that the written text portion in an image generally does not comprise more than 20% of the pixels of this image so that the remaining 80% of the pixels of the image are of no interest.